package com.ajz.config.activeMq;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.messaging.handler.annotation.SendTo;
import org.springframework.stereotype.Component;

@Component
public class consumer {
	@JmsListener(destination="msg.queue")
	@SendTo("out.queue") //将当前消费者return的数据发送out.queue中
	public String test(String text){
        System.out.println("Consumer2收到的报文为:"+text);  
        return "return message"+text;  
	}
	
}
